]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
search: Remove DND code from GridSearchResult
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 21 Aug 2014 10:17:46 +0000 (12:17 +0200)
committerCarlos Soriano <carlos.soriano89@gmail.com>
Mon, 1 Sep 2014 22:07:32 +0000 (00:07 +0200)
Providers that need drag-and-drop behavior can implement this via the
createResultObject() hook (as the app search provider already does), no
need to duplicate that code in the generic result objects
(ListSearchResult already does not implement DND).

https://bugzilla.gnome.org/show_bug.cgi?id=734726

js/ui/appDisplay.js
js/ui/search.js

index 24d386dd7e9b3f0f8bb24b882e60ef58f50bc616..6640966647c5762093011c2ce8f6d3edccc6d20a 100644 (file)
@@ -1054,14 +1054,6 @@ const AppSearchProvider = new Lang.Class({
         this.getInitialResultSet(terms, callback, cancellable);
     },
 
-    dragActivateResult: function(id, params) {
-        params = Params.parse(params, { workspace: -1,
-                                        timestamp: 0 });
-
-        let app = this._appSys.lookup_app(id);
-        app.open_new_window(workspace);
-    },
-
     createResultObject: function (resultMeta) {
         let app = this._appSys.lookup_app(resultMeta['id']);
         return new AppIcon(app);
index 3278c8f7910b0d727df283c091fd2db7175b4e46..47ab3acdc1ebfe36f28e1637f742702735f7d874 100644 (file)
@@ -230,37 +230,6 @@ const GridSearchResult = new Lang.Class({
         let content = new St.Bin({ child: this.icon.actor });
         this.actor.set_child(content);
         this.actor.label_actor = this.icon.label;
-
-        let draggable = DND.makeDraggable(this.actor);
-        draggable.connect('drag-begin',
-                          Lang.bind(this, function() {
-                              Main.overview.beginItemDrag(this);
-                          }));
-        draggable.connect('drag-cancelled',
-                          Lang.bind(this, function() {
-                              Main.overview.cancelledItemDrag(this);
-                          }));
-        draggable.connect('drag-end',
-                          Lang.bind(this, function() {
-                              Main.overview.endItemDrag(this);
-                          }));
-
-        this._dragActorSource = content;
-    },
-
-    getDragActorSource: function() {
-        return this._dragActorSource;
-    },
-
-    getDragActor: function() {
-        return this.metaInfo['createIcon'](Main.overview.dashIconSize);
-    },
-
-    shellWorkspaceLaunch: function(params) {
-        if (this.provider.dragActivateResult)
-            this.provider.dragActivateResult(this.metaInfo.id, params);
-        else
-            this.provider.activateResult(this.metaInfo.id, this.terms);
     }
 });